import VueRouter from 'vue-router'
//导入对应的路由组件
import HomeContainer from './components/tabbar/HomeContainer.vue'
import MemberContainer from './components/tabbar/MemberContainer.vue'
import SearchContainer from './components/tabbar/SearchContainer.vue'
import ShopcarContainer from './components/tabbar/ShopcarContainer.vue'
import newlist from './components/sidebars/newlist.vue'
// import newsinfo from './components/sidebars/sidebarInfo/newlistinInfo.vue'
import good from './components/sidebars/good.vue'
import call from './components/sidebars/call.vue'
import picture from './components/sidebars/picture.vue'
import video from './components/sidebars/video.vue'
import message from './components/sidebars/message.vue'
// 3. 创建路由对象
var router = new VueRouter({
  routes: [
    {path: '/', redirect: '/home' },
    {path : '/Home', component : HomeContainer},
    {path : '/Home/new', component : newlist},
    {path : '/Home/picture', component : picture},
    {path : '/Home/good', component : good},
    {path : '/Home/message', component : message},
    {path : '/Home/video', component : video},
    {path : '/Home/call', component : call},
    {path : '/Member', component : MemberContainer},
    {path : '/Shopcar', component : ShopcarContainer},
    {path : '/Search', component : SearchContainer}
    // { path: '/home/newsinfo/:id', component: NewsInfo }

    ],
    linkActiveClass: 'mui-active' 
    // 覆盖默认的路由高亮的类，可通过第二个参数来实现
    // 默认的类叫做 router-link-active
})

// 把路由对象暴露出去
export default router